package com.jiajiankang.friends;

import java.util.List;
import java.util.Map;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.SimpleAdapter;

import com.jiajiankang.R;

public class systemmessage extends Activity{
	private ListView lv;
	private SimpleAdapter adapter;
	private List<Map<String,String>> data;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.systemmessage);
		lv=(ListView)findViewById(R.id.systemmessage_lv);
		data=Systemmessage_myDataSource.getlist();
		adapter = new SimpleAdapter(systemmessage.this, data,
				R.layout.systemmessage_list, new String[] { "message"}, new int[] {
						R.id.systemmessage_list_tv});
		lv.setAdapter(adapter);
		lv.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
					long arg3) {
				// TODO Auto-generated method stub
				Intent intent=new Intent(systemmessage.this,DealMessage.class);
				startActivity(intent);
			}
		})
		
		;
		Button button=(Button)findViewById(R.id.systemmessage_back);
		button.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
			
				Intent intent=new Intent(systemmessage.this,privateshare.class);
			     startActivity(intent);
			}
		});
	}
      
}
